<?php ini_set("memory_limit","32M"); ?>
 
 
<link href="<?=base_url()?>asset/admin/css/style.css" rel="stylesheet" type="text/css">


		 
<div id="div_laporan">

	<table class="laporan" width="90%" border="1">

		<tr><td colspan="6"><b>Dinas Pendapatan Daerah Provinsi Kalimantan Timur</b></td></tr>

		<tr><td colspan="6"><b>JL. Mayjen M.T Haryono Samarinda</b></td></tr>

		<tr><td colspan="6"><b>TELP </b></td></tr>

		<tr><td colspan="6"><b></b><br/></td></tr>

		<tr><td colspan="6" div align="center"><b>LAPORAN PIUTANG PAJAK PER WILAYAH</b></td></tr>

		<tr><td colspan="6"><b>Periode : <?=$periode?></b></td></tr>

		<tr><td colspan="6"><b>Wilayah : <?=$kode_wil?> - <?=$kode_wilvalue?></b></td></tr>
		
		<tr><td colspan="6"><b>Jenis Kendaraan : <?=$jenis_kb?> - <?=$jenis_kbvalue?></b></td></tr>
		<tr>
			<th scope="col">NO</th>
			<th scope="col">WILAYAH</th>
			<th scope="col">JENIS</th>
			<th scope="col">PIUTANG PAJAK</th>
			<th scope="col">YANG SUDAH BAYAR</th>
			<th scope="col">SISA PAJAK</th> 
		</tr>

		

		<?php

		$j=0; 
		$sum_debet[] = 0; 
		 
			
			foreach($results->result() as $row)
			{
				$j=$j+1;
			?>
							<tr>
							<td align="right" valign="middle"><?=$j;?></td>
							<td align="left" valign="middle"><?=$row->kd_wilayah;?> - <?=$row->nm_wilayah;?></td> 
							<td align="left" valign="middle"><?=$row->kd_jenis_kb;?> - <?=$row->uraian;?></td>
							<td align="right" valign="middle"><?=convert_rupiah_non_rp($row->pkb);?></td>
							<td align="right" valign="middle"><?//=$row->bayar_pkb;?></td>
							<td align="right" valign="middle"><?//=($row->pkb-$row->bayar_pkb);?></td>
							 
		 
							<?php if (isset($row->pkb)){$sum_debet[]=$row->pkb;}?> 
							</tr>
			<?php
			}
			?>		
			
					
				 		
						<tr>
							<td colspan="3"><b>JUMLAH : </b></td> 
							<td align="right"><b><?php if (isset($row->pkb)){echo convert_rupiah_non_rp(array_sum($sum_debet));} ?></b></td>
							<td align="right"><b><?php //if (isset($row->pkb)){echo convert_rupiah_non_rp(array_sum($sum_debet));} ?></b></td>
							<td align="right"><b><?php //if (isset($row->pkb)){echo convert_rupiah_non_rp(array_sum($sum_debet));} ?></b></td>
							 
						</tr>		
						<tr>
							<td colspan="6">&nbsp;</td>
						</tr>
			 	 
	</table>

</div> 